


/** 提供常用控件的快速创建方法 */

#import <Foundation/Foundation.h>
#import "BaseButton.h"

@interface QYFactory : NSObject


/*---- BaseButton -----*/
+ (BaseButton *)buttonWithImage:(UIImage *)image;
+ (BaseButton *)buttonWithTitle:(NSString *)title;

+ (BaseButton *)buttonWithImage:(UIImage *)image frame:(CGRect)frame;
+ (BaseButton *)buttonWithTitle:(NSString *)title frame:(CGRect)frame;

+ (BaseButton *)buttonWithTitle:(NSString *)title image:(UIImage *)image frame:(CGRect)frame;

+ (BaseButton *)buttonWithImage:(UIImage *)image frame:(CGRect)frame font:(UIFont *)font fontColor:(UIColor *)color;
+ (BaseButton *)buttonWithTitle:(NSString *)title frame:(CGRect)frame font:(UIFont *)font fontColor:(UIColor *)color;

+ (BaseButton *)buttonWithTitle:(NSString *)title image:(UIImage *)image frame:(CGRect)frame font:(UIFont *)font fontColor:(UIColor *)color;

/*---- UILabel -----*/
//单行
+ (UILabel *)labelWithText:(NSString *)text;
+ (UILabel *)labelWithText:(NSString *)text textFont:(UIFont *)font;

+ (UILabel *)labelWithText:(NSString *)text frame:(CGRect)frame;
+ (UILabel *)labelWithText:(NSString *)text frame:(CGRect)frame textFont:(UIFont *)font;
+ (UILabel*)labelWithFrame:(CGRect)frame textFont:(UIFont *)font textColor:(UIColor *)color;
+ (UILabel *)labelWithText:(NSString *)text frame:(CGRect)frame textFont:(UIFont *)font textColor:(UIColor *)color;
+ (UILabel *)labelWithText:(NSString *)text frame:(CGRect)frame textFont:(UIFont *)font textColor:(UIColor *)color textAlignment:(NSTextAlignment)alignment;

//加载html文本
+ (UILabel *)labelWithHtmlText:(NSString *)text frame:(CGRect)frame textFont:(UIFont *)font textColor:(UIColor *)color;


/*---- UITextField -----*/
+ (UITextField *)textFieldWithPlaceholder:(NSString *)text;
+ (UITextField *)textFieldWithPlaceholder:(NSString *)text frame:(CGRect)frame;
+ (UITextField *)textFieldWithPlaceholder:(NSString *)text frame:(CGRect)frame font:(UIFont *)font;
+ (UITextField *)textFieldWithPlaceholder:(NSString *)text frame:(CGRect)frame backgroudImage:(UIImage *)image;
+ (UITextField *)textFieldWithPlaceholder:(NSString *)text frame:(CGRect)frame font:(UIFont *)font fontColor:(UIColor *)color;
+ (UITextField *)textFieldWithPlaceholder:(NSString *)text frame:(CGRect)frame font:(UIFont *)font fontColor:(UIColor *)color backgroudImage:(UIImage *)image;
+ (UITextField *)textFieldWithPlaceholder:(NSString *)text frame:(CGRect)frame font:(UIFont *)font fontColor:(UIColor *)color backgroudImage:(UIImage *)image borderStyle:(UITextBorderStyle)borderStyle;

/*---- UITextView -----*/
+ (UITextView *)textViewWithText:(NSString *)text frame:(CGRect)frame;
+ (UITextView *)textViewWithText:(NSString *)text frame:(CGRect)frame font:(UIFont *)font;
+ (UITextView *)textViewWithText:(NSString *)text frame:(CGRect)frame font:(UIFont *)font textColor:(UIColor *)color;

//加载html的UITextView
+ (UITextView *)textViewWithHtmlString:(NSString *)hString frame:(CGRect)frame font:(UIFont *)font textColor:(UIColor *)color;

/*---- UITableView -----*/
+ (UITableView *)tableViewWithFrame:(CGRect)frame;
+ (UITableView *)tableViewWithFrame:(CGRect)frame style:(UITableViewStyle)style;

/*---- UIImageView -----*/
+ (UIImageView *)imageViewWithImage:(UIImage *)image;
+ (UIImageView *)imageViewWithImage:(UIImage *)image frame:(CGRect)frame;
+ (UIImageView *)imageViewWithImage:(UIImage *)image frame:(CGRect)frame contentMode:(UIViewContentMode)contentMode;

#pragma mark - UIView
+(UIView*)viewWithFrame:(CGRect)frame;

+ (UIView *)viewWithFrame:(CGRect)frame backgroundColor:(UIColor *)color;


@end
